package com.web.mall.document;

import lombok.Data;
import org.springframework.data.annotation.Id;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldType;

import java.io.Serializable;

@Data
@Document(indexName = "mall_items")
public class EsGoods implements Serializable {
    @Id
    private Long id;
    @Field(analyzer = "ik_max_word",type = FieldType.Text)
    private String title;
    private String image;
    private Double price;
    private Long goodsId;
    @Field(type = FieldType.Keyword)  //如果要聚合统计，但不作分词
    private String category;
    @Field(type = FieldType.Keyword)
    private String brand;
    @Field(analyzer = "ik_smart",type = FieldType.Text)
    private String seller;


}
